﻿<m:LineBase
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:m="clr-namespace:Signum.Windows"
    x:Class="Signum.Windows.ValueLine"
    x:Name="me" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="540.993" d:DesignHeight="140" Style="{DynamicResource toolTip}">
    <m:LineBase.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../Resources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
    </m:LineBase.Resources>
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
		</Grid.ColumnDefinitions>
		<Label  Name="label" Content="{Binding Path=LabelText, ElementName=me, Mode=Default}" VerticalContentAlignment="Center" HorizontalAlignment="Left" 
		MinWidth="{Binding Path=(m:Common.MinLabelWidth), ElementName=me, Mode=OneWay}"
		 Visibility="{Binding ElementName=me, Path=(m:Common.LabelVisible), Converter={x:Static m:Converters.BoolToVisibility}}"/>
		<ContentPresenter Margin="1" Grid.Column="1" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" Content="{Binding Path=ValueControl, ElementName=me, Mode=TwoWay}"/>
        <TextBlock Text="{Binding Path=UnitText, ElementName=me, Mode=Default}" Grid.Column="2" VerticalAlignment="Center"  x:Name="unit" />
	</Grid>

</m:LineBase>
